﻿<?php // no direct access
defined('_JEXEC') or die('Restricted access');
$db = &JFactory::getDBO();
$db1 = &JFactory::getDBO();
//$query3 = "SELECT a.id, a.title, a.fulltext, a.introtext FROM jos_content AS a WHERE catid =3 AND state=1";
$query4 = "SELECT * FROM jos_content WHERE id=30";
$query3 = 'SELECT a.*, u.name AS author, u.usertype, cc.title AS category, s.title AS section,' .
					' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(":", a.id, a.alias) ELSE a.id END as slug,'.
					' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(":", cc.id, cc.alias) ELSE cc.id END as catslug,'.
					' g.name AS groups, s.published AS sec_pub, cc.published AS cat_pub, s.access AS sec_access, cc.access AS cat_access '.
					' FROM #__content AS a' .
					' LEFT JOIN jos_categories AS cc ON cc.id = a.catid' .
					' LEFT JOIN jos_sections AS s ON s.id = cc.section AND s.scope = "content"'.
					' LEFT JOIN jos_users AS u ON u.id = a.created_by'.
					' LEFT JOIN jos_groups AS g ON a.access = g.id'.' WHERE catid=3 AND state=1 ORDER BY ordering';
$db->setQuery($query3);
$tmp = $db->loadObjectList();

$db1->setQuery($query4);
$tmp1 = $db->loadObject();
?>

<div id="main" class="service">
	<!--left sidebar-->
	<div class="aside">
		<!--Category-->
		<div class="category" id="serviceCat">
			<h2>Services</h2>
			<ul class="cat-list">
			<?php for($l=0;$l<count($tmp);$l++){?>
		  
				<li><a href="index.php?option=com_content&view=article&id=<?php echo $tmp[$l]->id; ?>&Itemid=21"><?php echo $tmp[$l]->title; ?></a></li>                                      
		
				<?php }?>
			</ul> 
		</div>
		<!-- /Category-->
		<div class="contact-info">
			 {module Firma infomation}
		</div>
	</div>
	<!-- Begin main-content  -->
	
	<div id="content" class="with-sidebar">
		<h1 class="page-title">KVITTERING</h1>
		<!-- Begin service content  -->
		<div class="content-ctn">
			<div class="sub-banner"><img src="images/thumb/timthumb.php?src=<?php echo $tmp1->article_image ?>&w=693&h=119&zc=1" alt="SG Gruppen Service" /></div>
			<div class="service-info">
				 <?php 
			echo $tmp1->introtext;                             
			?>
				
			</div>
			
			
		</div>
		<!-- / service content  -->
		
	</div>
	<!-- / main-content  -->
	  
	<!-- /end mid-content  -->
</div>
